<template>
	<view class='my'>
		<!--头部-->
		<view class='my-header'>
			<view class='header-main'>
				<view class='header-config' @tap='goConfig'>
					<image class='config-img' src="../../static/img/config.png" mode=""></image>
				</view>
				<view class='header-logo'>
					<image class='logo-img' :src=" loginStatus ? userInfo.imgUrl : '../../static/img/Children.jpg' "
						mode=""></image>
					<view class='logo-name'>
						{{ loginStatus ? userInfo.nickName : "用户名称"   }}
					</view>
				</view>
			</view>
		</view>
		<!--我的订单-->
		<view class='order'>
			<view class='order-title' @tap='goOrder'>
				<view>我的订单</view>
				<view>
					全部订单
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
			<view class='order-list'>
				<view class='order-item'>
					<image class='order-img' src="../../static/img/order1.png" mode=""></image>
					<view>待付款</view>
				</view>
				<view class='order-item'>
					<image class='order-img' src="../../static/img/order2.png" mode=""></image>
					<view>待发货</view>
				</view>
				<view class='order-item'>
					<image class='order-img' src="../../static/img/order3.png" mode=""></image>
					<view>待收货</view>
				</view>
				<view class='order-item'>
					<image class='order-img' src="../../static/img/order4.png" mode=""></image>
					<view>待评价</view>
				</view>
				<view class='order-item'>
					<image class='order-img' src="../../static/img/order5.png" mode=""></image>
					<view>退款管理</view>
				</view>
			</view>
		</view>
		<!--内容列表-->
		<view class='my-content'>
			<view class="my-content-item">
				<view class="iconfont icon-xihuan red"></view>
				<view class="content-main">
					<view>我的收藏</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
			<view class="my-content-item">
				<view class="iconfont icon-youhuiquan pink"></view>
				<view class="content-main">
					<view>我的优惠券</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
			<view class="my-content-item">
				<view class="iconfont icon-jifen yellow"></view>
				<view class="content-main">
					<view>我的积分</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
		</view>
		
		<view class="my-content">
			<view class="my-content-item">
				<view class="iconfont icon-ts-tubiao_vip orange"></view>
				<view class="content-main">
					<view>加入超级VIP</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
		</view>
		
		<view class="my-content">
			<view class="my-content-item">
				<view class="iconfont icon-help blue"></view>
				<view class="content-main">
					<view>帮助中心</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
			<view class="my-content-item">
				<view class="iconfont icon-kefu purple"></view>
				<view class="content-main">
					<view>联系客服</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
			<view class="my-content-item">
				<view class="iconfont icon-dianpu red"></view>
				<view class="content-main">
					<view>商家入驻</view>
					<view class="iconfont icon-xiangyou1"></view>
				</view>
			</view>
		</view>
		
		<Tabbar cureentPage='my'></Tabbar>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	import Tabbar from '@/components/common/Tabbar.vue'
	export default {
		data() {
			return {

			}
		},
		components: {
			Tabbar
		},
		computed: {
			...mapState({
				loginStatus: state => state.user.loginStatus,
				userInfo: state => state.user.userInfo
			})
		},
		methods: {
			goConfig() {
				uni.navigateTo({
					url: '../my-config/my-config'
				})
			},
			goOrder() {
				uni.navigateTo({
					url: '../my-order/my-order'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.my {
		height: 100vh;
		background-color: #f3f3f3;
	}

	.my-header {
		background: url(../../static/img/mybg.png) no-repeat;
		width: 100%;
		height: 400rpx;
	}

	.header-main {
		position: relative;
		top: 120rpx;
	}

	.header-config {
		position: absolute;
		left: 20rpx;
	}

	.header-logo {
		position: absolute;
		left: 50%;
		margin-left: -60rpx;
		width: 120rpx;
	}

	.config-img {
		width: 40rpx;
		height: 40rpx;
	}

	.logo-img {
		width: 120rpx;
		height: 120rpx;
		border: 2rpx solid #CCCCCC;
		border-radius: 50%;
		background-color: #FFFFFF;
	}

	.logo-name {
		font-weight: bold;
		color: #FFFFFF;
		text-align: center;
	}

	.order {
		background-color: white;
	}

	.order-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx;
		box-sizing: border-box;
		font-size: 32rpx;
		color: $uni-text-color-grey;
	}

	.order-title>view:first-child {
		color: black;
		font-size: 34rpx;
	}

	.order-title>view:last-child {
		display: flex;
	}

	.order-title .iconfont {
		margin-left: 20rpx;
	}

	.order-list {
		padding: 20rpx;
		display: flex;
	}

	.order-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.order-img {
		width: 66rpx;
		height: 66rpx;
	}

	.my-content {
		margin: 30rpx 0;
		// padding: 0 20rpx;
		background-color: white;
	}

	.my-content-item {
		display: flex;
	}

	.my-content-item .iconfont {
		// flex: 1;
		margin: 0 20rpx;
		font-size: 50rpx;
		padding-bottom: 1rpx;
	}

	.content-main {
		width: 100%;
		// flex: 9;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 2px solid #f3f3f3;
	}

	.content-main view {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.content-main>view:first-child {
		font-size: 32rpx;
		font-weight: bold;
		letter-spacing: 2rpx;
	}

	.content-main .iconfont {
		font-size: 40rpx;
		color: $uni-text-color-grey;
	}

	.red {
		color: red;
	}

	.pink {
		color: deeppink;
	}

	.yellow {
		color: gold;
	}

	.orange {
		color: orange;
	}

	.blue {
		color: skyblue;
	}

	.purple {
		color: mediumpurple;
	}
</style>
